<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.view');
jimport('joomla.html.pagination');

class EcommerceViewList extends JView
{
	function display($tpl = null)
	{
		global $option, $mainframe;
		$model = &$this->getModel();
		
		$user = & JFactory::getUser();
		$user_id = $user->id;
		
		$userinfo = $model->getUserinfo($user_id); 
		
		$listcategory = $model->getListCategories();
		
		$producttype = $model->getProducttype();
		
		$minicart = $model->getminicart();
		
		
		
		$this->assign('userinfo', $userinfo[0]);
		$this->assign('minicart', $minicart);
		$this->assign('listcategory', $listcategory);
		$this->assign('producttype', $producttype);
		
		parent::display($tpl);	
	}
	
	function formatPrice($number){
		$number = number_format($number,2,",","");
		return str_replace(",00", ",-", $number);
	}
}
?>